$(document).ready(function () {
	$("#submit").click(function(){
		if(!paramCheck())
		{
			return false;
		}
	});
});


function paramCheck() {
	var mobile = $("#mobile").val();
	if (mobile == null || mobile.length != 11) {
		$("#mobile_error_field").html("\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u7801");
		return false;
	}
	
	var status=false;
	$.ajax({
            url: "registrationAjax.do",  
            type: "GET",      
            async: false,
            data:{mobile:mobile},
            success: function(msg) {
                if(msg == 'F')
                {
                	status = true;
                }
                $("#mobile_error_field").html("手机号码已存在");
            }
     });
	
	return status;
}


